# Maintainer: Jiachen Yang <farseerfc@gmail.com>
# AUR Maintainer: valère monseur <valere dot monseur at ymail dot com>

pkgname=python-ghp-import
_pkgname=ghp-import
pkgver=1.1.0
pkgrel=4
pkgdesc='Copy your docs directly to the gh-pages branch'
arch=('any')
url="https://pypi.python.org/pypi/ghp-import"
license=(custom:Tumbolia)
depends=('python')
makedepends=('python-setuptools' 'git')
replaces=('ghp-import')
conflicts=('ghp-import')
source=("${_pkgname}-${pkgver}.tar.gz::https://pypi.python.org/packages/source/${_pkgname::1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
#source=("https://github.com/davisp/${_pkgname}/archive/${pkgver}.tar.gz")
#source=("${_pkgname}-${pkgver}::git+https://github.com/davisp/ghp-import.git#commit=ab2637fb7a84ed79d6baeb74db7f9e544a448a04")
sha512sums=('84fe3858bbab2fc7f0c934bd43cc221fc9d6d55eaa5834e84c9bca1d768776204488f6ca1fc063d3cfe30922d1a2c23ad5ac4441e5938d6978c7785e5d6cb685')

build() {
  cd "${srcdir}/${_pkgname}-${pkgver}"
  LC_CTYPE=en_US.UTF-8 python setup.py build
}

package() {
  cd "${srcdir}/${_pkgname}-${pkgver}"
  LC_CTYPE=en_US.UTF-8 python setup.py install --root="$pkgdir" -O1
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
